/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bizfty.api.apimanager.models;

import com.bizfty.api.commons.models.BasicEntity;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 模型所对应的属性
 * @author johns
 */
@Entity
@Table(name = "T_API_FIELD")
@XmlRootElement
public class Field extends BasicEntity {
    /**
     * 模型
     */
    @ManyToOne
    @JoinColumn(name="MODEL_ID")
    private Model model;
    /**
     * 属性名称
     */
    private String name;
    /**
     * 数据类型
     */
    @Embedded
    private DataType DateType;
    /**
     * 领域
     */
    @ManyToOne
    @JoinColumn(name="DOMAIN_ID")
    private Domain domain;
}
